package quadric_ecuation;

import org.junit.Assert;

import junit.framework.TestCase;

public class QuadricEcuationTest extends TestCase {

	

	public void test1(){
		QuadricEcuation ec = new QuadricEcuation(1, -3, 2);
		double x1 = ec.getSolution1();
		double x2 = ec.getSolution2();
		Assert.assertEquals(1, x1, 1e-14);
		Assert.assertEquals(2, x2, 1e-14);
	}

	public void test2(){
		QuadricEcuation ec = new QuadricEcuation(1, 1, 1);
		double x1 = ec.getSolution1();
		double x2 = ec.getSolution2();
		Assert.assertEquals(0, x1, 1e-14);
		Assert.assertEquals(0, x2, 1e-14);
	}
}
